package com.ykdl.member.kid.beans;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import android.text.TextUtils;
import net.wxxr.http.interfaces.IJsonParser;

public class Nappy extends Nursing {
	
	public static final int NAPPY_RECORD_TYPE_URINE = 1; //小便
	public static final int NAPPY_RECORD_TYPE_DEFECATE = 2; //大便
	public static final int NAPPY_RECORD_TYPE_ALL = 3; //小+大


	public static final int DEFECATE_COLOR_NORMAL = 1; //大便颜色正常 (金黄)
	public static final int DEFECATE_COLOR_GREEN = 2; //黄绿
	public static final int DEFECATE_COLOR_TAN = 3; //土黄
	public static final int DEFECATE_COLOR_RUSSET = 4; //土棕
	public static final int DEFECATE_COLOR_GRAY = 5; //灰白
	public static final int DEFECATE_COLOR_LIME = 6; //青绿
	public static final int DEFECATE_COLOR_BROWN = 7; //褐色
	public static final int DEFECATE_COLOR_RED = 8; //红色
	public static final int DEFECATE_COLOR_BLACK = 9; //黑色

	public static final int DEFECATE_SHAPE_NORMAL = 1; //大便形状正常
	public static final int DEFECATE_SHAPE_MECONIUM = 2; //胎便
	public static final int DEFECATE_SHAPE_BREAST_FED_PIECES = 3; //奶瓣
	public static final int DEFECATE_SHAPE_HARD = 4; //坚硬
	public static final int DEFECATE_SHAPE_BALL = 5; //小球
	public static final int DEFECATE_SHAPE_OIL = 6; //油性
	public static final int DEFECATE_SHAPE_FOAM = 7; //泡沫
	public static final int DEFECATE_SHAPE_DIARRHOEA = 8; //拉稀
	public static final int DEFECATE_SHAPE_SLAG = 9; //渣
	
	private int excrete_type; //排泄类型 大便/小便
	private int spill_over; //溢出类型
	private int shape; // 大便形状
	private int color; //大便颜色
	
	public Nappy(){}
	
	public Nappy(long id, long actor_id, int nursing_type, float create_time,
			int excrete_type, int spill_over, int shape, int color) {
		super(id, actor_id, nursing_type, create_time);
		this.excrete_type = excrete_type;
		this.spill_over = spill_over;
		this.shape = shape;
		this.color = color;
	}

	public int getExcrete_type() {
		return excrete_type;
	}

	public void setExcrete_type(int excrete_type) {
		this.excrete_type = excrete_type;
	}

	public int getSpill_over() {
		return spill_over;
	}

	public void setSpill_over(int spill_over) {
		this.spill_over = spill_over;
	}

	public int getShape() {
		return shape;
	}

	public void setShape(int shape) {
		this.shape = shape;
	}

	public int getColor() {
		return color;
	}

	public void setColor(int color) {
		this.color = color;
	}

	@Override
	public int getNursing_type() {
		return NURSING_RECORD_TYPE_NAPPY;
	}

	@Override
	public IJsonParser parse(String json) throws Exception {
		if (json != null && !TextUtils.isEmpty(json)) {
			GsonBuilder builder = new GsonBuilder();
			Gson gson = builder.create();
			return gson.fromJson(json, Nappy.class);
		}
		return null;
	}

}
